import React from 'react';
import './SnowCanvas.scss';


export default class SnowCanvas extends React.PureComponent {

    constructor(props,context){
        super(props,context);
    }

    render() {
        console.log(this.props.type);
        let image;
        if(this.props.type == 'snow'){
            image = 'http://ovckjkwel.bkt.clouddn.com/snow.png';
        }
        if(this.props.type == 'leaf'){
            image = 'http://ovckjkwel.bkt.clouddn.com/leaf.png';
        }
        if(this.props.type == 'flower'){
            image = 'http://ovckjkwel.bkt.clouddn.com/flower.png';
        }
        console.log(image)
        return (
            <canvas className="snow-canvas" speed="3" interaction="true" size="12" count="20" wind-power="-5" data-image={image} width="100%" height="100%"></canvas>
        )
    }
}
